﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Freejobber.Core.Generic.Helpers
{
    public class MailHelperClass
    {
        public static void SendRegisterEmail(string messageTo,string regGuid)
        {
            string body = "<a href='ffff'>fffggg</a>";
            sendEmail(messageTo, "admin@admin.ru", "ff", body);
        }

        private static void sendEmail(string messageTo,string messageFrom,string subject,string body)
        {
            System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
            message.To.Add(messageTo);
            message.Subject = subject;
            message.From = new System.Net.Mail.MailAddress(messageFrom);
            message.Body = body;
            System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(ConfigManager.SmtpServer);
            smtp.Send(message);
        }
    }
}
